import java.util.Scanner;

class PaymentService{
    public void makePaymentService(double account){
        System.out.println();
    }
}
class CreditCardParmentService extends PaymentService{
    @Override
    public void makePaymentService(double account){
        System.out.println("使用信用卡支付了"+account+"元");
    }
    public String s(){
        return this.toString();
    }
}
class PayPalPayment extends PaymentService{
    @Override
    public void makePaymentService(double account){
        System.out.println("使用PayPal支付了"+account+"元");
    }
}
class PayPalPayment1 extends PaymentService{
    @Override
    public void makePaymentService(double account){
        System.out.println("使用支付宝支付了"+account+"元");
    }
}
public class Main {
    public static void Payment(PaymentService pay,double account){
        pay.makePaymentService(account);
    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int i= sc.nextInt();
        double account= sc.nextDouble();
        new CreditCardParmentService().s();
        switch (i){
            case 1:
                Payment(new CreditCardParmentService(),account);
                break;
            case 2:
                Payment(new PayPalPayment(),account);
                break;
            case 3:
                Payment(new PayPalPayment1(),account);
        }
    }
}